import { ReactNode, lazy } from 'react'
import { createHashRouter } from 'react-router-dom'
const Home = lazy(() => import('../pages/Home'))
const Login = lazy(() => import('../pages/Login'))

interface Route {
  path: string
  name: string
  element: ReactNode
  children?: Route[]
  auth?: boolean
}
export const routes: Route[] = [
  {
    path: '/',
    name: 'Home',
    element: <Home />
  },
  {
    path: '/login',
    name: 'Login',
    element: <Login />
  }
]
const router = createHashRouter(routes)

export default router
